package com.luo.pojo.ums.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

import static com.luo.common.validation.RegExpressions.*;
import static com.luo.common.validation.RegExpressions.MESSAGE_USER_PASSWORD;

@Data
public class UserLoginDto implements Serializable {
    /**
     * 用户名
     */
    @NotNull(message = "请填写用户名！")
    @Pattern(regexp = REGEXP_USER_USERNAME, message =  MESSAGE_USER_USERNAME)
    private String username;

    /**
     * 密码
     */
    @NotNull(message = "请填写密码！")
    @Pattern(regexp = REGEXP_USER_PASSWORD, message =  MESSAGE_USER_PASSWORD)
    private String password;

    /**
     * 客户端登录ip,后台填写
     */
    private String ip;

    /**
     * 用户代理,后台填写
     */
    private String userAgent;
}
